package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.*;

import java.util.HashMap;
import java.util.Map;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class SystemDictionaryItem {
    //  编号
    private Long id;

    //  关联的字典目录主键
    private Long parentId;

    //  标题
    private String title;

    //  序号
    private Integer sequence;

    public String getJson(){
        Map<String, Object> map = new HashMap<>();
        map.put("id", id);
        map.put("parentId", parentId);
        map.put("title", title);
        map.put("sequence", sequence);
        return JSON.toJSONString(map);
    }

}